package main

import (
	"fmt"
	"sort"
)

//map 切片
func main() {
	var map1 map[string]int = map[string]int{"a": 11, "b": 2, "c": 9, "d": 12, "e": 5, "f": 13}
	modify(map1) // 引用类型
	fmt.Println(map1)
	var slice1 []int
	for _, v := range map1 {
		slice1 = append(slice1, v)
	}
	fmt.Println(slice1)
	sort.Ints(slice1) //排序
	fmt.Println(slice1)
}

func modify(map1 map[string]int) {
	map1["aa"] = 99
}
